package com.ruoyi.ycl.domain.vo;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.annotation.ExcelDictFormat;
import com.ruoyi.common.convert.ExcelDictConvert;
import com.ruoyi.common.utils.BigDecimalUtil;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;



/**
 * 原材料进场台账视图对象 ycl_bs_jctz
 *
 * @author zyb
 * @date 2024-06-05
 */
@Data
@ExcelIgnoreUnannotated
public class BsJctzVo {

    private static final long serialVersionUID = 1L;

    /**
     * 台账id
     */
    @ExcelProperty(value = "台账id")
    private Long tzId;

    /**
     * 试验室id
     */
    @ExcelProperty(value = "试验室id")
    private Long deptId;

    private String deptName;

    /**
     * 材料类型字典cl_type
     */
    @ExcelProperty(value = "材料类型字典cl_type", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "cl_type")
    private String clType;

    /**
     * 材料类型-label
     */
    private String clTypeLabel;

    /**
     * 规格型号
     */
    @ExcelProperty(value = "规格型号")
    private String guigxh;

    /**
     * 供应商id
     */
    @ExcelProperty(value = "供应商id")
    private Long supId;

    private String supName;

    /**
     * 产地厂家
     */
    @ExcelProperty(value = "产地厂家")
    private String chandcj;

    /**
     * 进场数量
     */
    @ExcelProperty(value = "进场数量")
    private BigDecimal inNum;

    /**
     * 进场数量单位字典unit
     */
    @ExcelProperty(value = "进场数量单位字典unit", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "unit")
    private String inUnit;

    /**
     * 进场日期
     */
    @ExcelProperty(value = "进场日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date inDate;

    /**
     * 存放位置
     */
    @ExcelProperty(value = "存放位置")
    private String cunfwz;

    /**
     * 批号
     */
    @ExcelProperty(value = "批号")
    private String pih;

    /**
     * 出厂日期
     */
    @ExcelProperty(value = "出厂日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date chucDate;

    /**
     * 代表数量
     */
    @ExcelProperty(value = "代表数量")
    private BigDecimal daibNum;

    /**
     * 代表数量单位字典unit
     */
    @ExcelProperty(value = "代表数量单位字典unit", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "unit")
    private String daibUnit;

    /**
     * 被试验次数
     */
    @ExcelProperty(value = "被试验次数")
    private Long syTimes;

    /**
     * 状态
     */
    @ExcelProperty(value = "状态")
    private String tzStatus;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String tzRemark;

    /**
     * 进场数量vo
     */
    private String jincsl;

    /**
     * 代表数量vo
     */
    private String daibsl;


    public void setInNum(BigDecimal inNum) {
        this.inNum = BigDecimalUtil.stpTrailZero(inNum);
    }

    public void setDaibNum(BigDecimal daibNum) {
        this.daibNum = BigDecimalUtil.stpTrailZero(daibNum);
    }
}
